\hypertarget{class_r_t_o_s_1_1clock}{\section{R\-T\-O\-S\-:\-:clock Class Reference}
\label{class_r_t_o_s_1_1clock}\index{R\-T\-O\-S\-::clock@{R\-T\-O\-S\-::clock}}
}


free-\/running clock, ticks at a fixed frequency  




{\ttfamily \#include $<$p\-R\-T\-O\-S.\-h$>$}

Inheritance diagram for R\-T\-O\-S\-:\-:clock\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{class_r_t_o_s_1_1clock}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_r_t_o_s_1_1clock_acddd4420f67c5af6e130ca177526d148}{clock} (\hyperlink{class_r_t_o_s_1_1task}{task} $\ast$\hyperlink{class_r_t_o_s_1_1event_a1402687edb26c1d5d26e54dbda21919d}{t}, unsigned long long int \hyperlink{class_r_t_o_s_1_1clock_aeef3e995e7334fc203f0062e532a5804}{interval}, const char $\ast$name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em create a clock for task t, specify interval and name \end{DoxyCompactList}\item 
void \hyperlink{class_r_t_o_s_1_1clock_a90d7c2b274fff1b43a1de08e742c41c3}{clear} (void)
\begin{DoxyCompactList}\small\item\em clear the waitable within the clock \end{DoxyCompactList}\item 
\hypertarget{class_r_t_o_s_1_1clock_aeef3e995e7334fc203f0062e532a5804}{unsigned int \hyperlink{class_r_t_o_s_1_1clock_aeef3e995e7334fc203f0062e532a5804}{interval} (void)}\label{class_r_t_o_s_1_1clock_aeef3e995e7334fc203f0062e532a5804}

\begin{DoxyCompactList}\small\item\em the interval of the timer \end{DoxyCompactList}\item 
\hypertarget{class_r_t_o_s_1_1clock_ad2d6da1595d84cbcc93cb73ed888a72a}{void \hyperlink{class_r_t_o_s_1_1clock_ad2d6da1595d84cbcc93cb73ed888a72a}{print} (std\-::ostream \&s, bool header=true) const }\label{class_r_t_o_s_1_1clock_ad2d6da1595d84cbcc93cb73ed888a72a}

\begin{DoxyCompactList}\small\item\em print the clock (for debugging) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_r_t_o_s_1_1clock_aa5b30b5b619f01a5d94b779bf0e58610}{class {\bfseries R\-T\-O\-S}}\label{class_r_t_o_s_1_1clock_aa5b30b5b619f01a5d94b779bf0e58610}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
free-\/running clock, ticks at a fixed frequency 

\begin{DoxyVerb}  A clock is a waitable which is automatically sets itself 
  at fixed intervals. 
  The interval between these moments is specified when the 
  clock is created. 
  A clock is always running, even when the task to which it 
  belongs is suspended.

  The example below again shows the left-shifting and polarity 
  flipping Kitt display, but the actions are now caused by two 
  clocks. 
  Note that unlike the timers examples the clocks are never 
  explictly started.

  @code 
\end{DoxyVerb}
 T\-B\-W  

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_r_t_o_s_1_1clock_acddd4420f67c5af6e130ca177526d148}{\index{R\-T\-O\-S\-::clock@{R\-T\-O\-S\-::clock}!clock@{clock}}
\index{clock@{clock}!RTOS::clock@{R\-T\-O\-S\-::clock}}
\subsubsection[{clock}]{\setlength{\rightskip}{0pt plus 5cm}R\-T\-O\-S\-::clock\-::clock (
\begin{DoxyParamCaption}
\item[{{\bf task} $\ast$}]{t, }
\item[{unsigned long long int}]{interval, }
\item[{const char $\ast$}]{name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_r_t_o_s_1_1clock_acddd4420f67c5af6e130ca177526d148}


create a clock for task t, specify interval and name 

The name is used for debugging and statistics. 

\subsection{Member Function Documentation}
\hypertarget{class_r_t_o_s_1_1clock_a90d7c2b274fff1b43a1de08e742c41c3}{\index{R\-T\-O\-S\-::clock@{R\-T\-O\-S\-::clock}!clear@{clear}}
\index{clear@{clear}!RTOS::clock@{R\-T\-O\-S\-::clock}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}void R\-T\-O\-S\-::clock\-::clear (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}}\label{class_r_t_o_s_1_1clock_a90d7c2b274fff1b43a1de08e742c41c3}


clear the waitable within the clock 

Note that this does not stop the clock. 

Reimplemented from \hyperlink{class_r_t_o_s_1_1waitable_a44ac71980592721bc03e076acc7e8c67}{R\-T\-O\-S\-::waitable}.



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
p\-R\-T\-O\-S.\-h\item 
p\-R\-T\-O\-S.\-cpp\end{DoxyCompactItemize}
